const http = uni.$u.http
export default {
  /**
   * 政策配置
   */
    // TODO
    getPolicyList: (data) => http.get('/core/agreement-config/listByType', data),
    getPolicyDetail: (data) => http.get('/core/agreement-config/get', data),
    getConfig: (data) => http.get('/core//param-config/getByCode', data),
    getNoticePage: (data) => http.get('/core/appNotice/get', data),
    // TODO
    updateMemberInfo: (data) => http.post('/member/social-user/update', data),
    /**
     * 登录
     */
    wxlogin: (data) => http.post('/member/auth/weixin-mini-app-login', data),
    getState: (data) => http.get('/member/auth/social-auth-redirect', data),
    getMemberInfo: () => http.get('/member/social-user/get', { type: 34 }),
    /**
     * 首页
     */
    // 充电站列表,根据定位
    getChargeStationList: (data) => http.post('/core/appIndex/getStationList', data),
    /**
     * 钱包
     */
    // 充值
    recharge: (data) => http.post('/core/wechat/pay/createOrder', data),
    // 获取钱包
    getBalance: () => http.get('/core/appBalance/get'),

    /**
     * 充电
     * TOP_UP("top_up", "预付款支付"),
     * ORDER_TOP_UP("order_top_up", "余额充值支付"),
     * PAY("pay", "支付"),
     * RENEWAL("renewal","续充"),
     * REFUND("refund","退款"); core/wechat/pay/createOrder
     */
    getOrderStatus: (data) => http.get('/core/appOrder/getOrderStatus', data),
    getOrderDetail: (data) => http.get('/core/appOrder/getOrderDetail', data),
    closeOrder: (data) => http.post('/core/appOrder/endOfCharging', data),
    getOrderPage: (data) => http.post('/core/appOrder/getOrderList', data),


  /**
   * 业务接口
   */
  // wxMenu列表
  getWxMenuList: (data) => http.get('/wxMenu/list', data),
  // banner列表
  getWxBannerList: (data) => http.get('/wxBanner/list', data),
}
